package com.aabte.design.pattern.structural.flyweight;

public class Test {

    private static final String[] departments = {"RD", "QA", "PM", "CEO"};

    public static void main(String[] args) {

        for (int i = 0; i < 10; i++) {
            int index = (int) (Math.random() * departments.length);
            String department = departments[index];
            System.out.println(department);
            Manager manager = (Manager) EmployeeFactory.getManager(department);
            manager.report();
            System.out.println();
        }

    }

}
